xen/arm: mm: Embed permission in the flags
authorJulien Grall <julien.grall@arm.com>
Mon, 9 Oct 2017 13:23:39 +0000 (14:23 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 10 Oct 2017 21:25:13 +0000 (14:25 -0700)
commit28f2ad440a08908010abec43b7ccc3283051e943
tree91c49913ac13c249890791b458e6cabf34c40b95
parent5f3edb5f32e511b915d173403d0b7b5ea38e00ad
xen/arm: mm: Embed permission in the flags

Currently, it is not possible to specify the permission of a new
mapping. It would be necessary to use the function modify_xen_mappings
with a different set of flags.

Introduce a couple of new flags for the permissions (Non-eXecutable,
Read-Only) and also provides definition that combine the memory attribute
and permission for common combinations.

PAGE_HYPERVISOR is now an alias to PAGE_HYPERVISOR_RW (read-write,
non-executable mappings). This does not affect the current mapping using
PAGE_HYPERVISOR because Xen is currently forcing all the mapping to be
non-executable by default (see mfn_to_xen_entry).

A follow-up patch will change modify_xen_mappings to use the new flags.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
xen/include/asm-arm/page.h